package br.edu.unifei.mestrado.fm;

import br.edu.unifei.mestrado.commons.graph.GraphWrapper;
import br.edu.unifei.mestrado.commons.partition.AbstractPartition;
import br.edu.unifei.mestrado.commons.partition.AbstractPartitionIndex;
import br.edu.unifei.mestrado.mem.graph.Graph;
import br.edu.unifei.mestrado.mem.graph.PartitionIndexMem;

public class FMMemory extends FM {

	protected GraphWrapper grafo = null;
	private AbstractPartitionIndex index = null;

	public FMMemory(String graphFileName) {
		grafo = new Graph(GraphWrapper.NO_LEVEL, graphFileName);
		index = new PartitionIndexMem(AbstractPartition.TWO_WAY);
	}

	@Override
	public void readGraph() {
		grafo.readGraph();
	}

	@Override
	protected GraphWrapper getGrafo() {
		return grafo;
	}
	
	@Override
	public AbstractPartitionIndex getPartitionIndex() {
		return index;
	}
}
